<div>
  <form data-ng-search-form ng-click="$event.stopPropagation()">
    <input type="hidden" name="_csrf" value="{{csrf}}"/>

    <div class="form-controls">
      <input class="form-control filter-text" type="search"
        data-ng-change="triggerSearch()"
        data-ng-model-options="modelOptions"
        placeholder="{{'filter' | translate}}" autofocus=""
        data-ng-model="searchObj.params.any"/>
      <div class="spacer"></div>
      <div data-gn-pagination="paginationInfo"/>
    </div>

    <div translate ng-show="searchResults.count == 0 && !searching"
      class="text-muted disabled">
      noRecordFound
    </div>

    <div ng-show="searching" class="text-center">
      <i class="fa fa-spinner fa-spin" />
    </div>

    <div class="associated-md-list" ng-show="!searching">
      <li class="associated-md flex-row"
        data-ng-repeat="e in searchResults.records">
          <gn-md-type-widget metadata="e"></gn-md-type-widget>

          <a href="catalog.search#/metadata/{{e['geonet:info'].uuid}}"
            class="flex-shrink text-ellipsis"
            title="{{e.title || e.defaultTitle}}">
            {{e.title || e.defaultTitle}}</a>

          <div class="flex-spacer flex-grow"></div>

          <a class="btn btn-primary btn-sm"
             data-ng-href="#/metadata/{{e['geonet:info'].id}}"
             title="{{'edit' | translate}}">
            <i class="fa fa-pencil" />
          </a>
      </li>
    </div>

  </form>
</div>
